<?php

use yii\db\Migration;

/**
 * Handles the creation of table `rel_archive_and_material`.
 */
class m170328_024706_create_rel_archive_and_material_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->createTable('{{%rel_archive_and_material}}', [
            'archive_id' => $this->integer()->comment('文档序号'),
	        'material_id'=>$this->integer()->comment('素材序号'),
        ]);
        $this->addPrimaryKey('primaryKey','{{%rel_archive_and_material}}',['archive_id','material_id']);
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        $this->dropTable('{{%rel_archive_and_material}}');
    }
}
